package com.xiaoxie.controller;


import com.xiaoxie.entity.Result;
import com.xiaoxie.entity.learnLog;
import com.xiaoxie.service.ILearnLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/learnLog")
public class learnLogController {
    @Autowired
    private ILearnLogService learnLogService;
    @GetMapping("/{account}")
    public Result<List<learnLog>> getAll(@PathVariable String account){
        List<learnLog> allLearnLog = learnLogService.
                getAllLearnLog(account);
        return  Result.success(allLearnLog);
    }
}
